import Vue from 'vue'
import VueRouter from 'vue-router'

import login from '@/views/My-login.vue'
import register from '@/views/My-register.vue'
import layout from '@/views/My-layout.vue'
import city from '@/views/My-city.vue'
import home from '@/views/My-home.vue'
import find from '@/views/My-find.vue'
import my from '@/views/My-my.vue'
import collect from '@/views/My-collect.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {
      path: '/login',
      component: login
    },
    {
      path: '/register',
      component: register
    },
    {
      path: '/city',
      component: city
    },
    {
      path: '/',
      component: layout,
      children: [
        {
          path: 'home',
          component: home
        },
        {
          path: 'find',
          component: find
        },
        {
          path: 'collect',
          component: collect
        },
        {
          path: 'my',
          component: my
        }
      ]
    }
  ]
})

export default router
